<template>
	<div>
		<table>
			<tr style='float:left'>
				<td>
					数据类型:
				</td>
				<td>
					<el-select v-model ='SelValue'  @change="handleChange" size="mini"   placeholder="请选择">
                                                <el-option
                                                v-for="item in DataTypes"
                                                :key="item.TypeValue"
                                                :label="item.TypeName"
                                                :value="item.TypeValue"
																								
																								>
									
																											
                                                </el-option>
                                        </el-select>
				</td>
			</tr>
		</table>
     
	   
	</div>
</template>

<script>
  import Vue from 'vue'
  import DataDefine, {QuestionDataTypes} from './ts/QuestionDataTypes'

	
export default {
  
  props: {
    value: QuestionDataTypes.dtText
  },
     data() {
       return {DataTypes:[], SelValue:QuestionDataTypes.dtText}
		 },
		 
	created:function()
	   {
		   this.DataTypes.push(new DataDefine("文本",QuestionDataTypes.dtText));
		   this.DataTypes.push(new DataDefine("数字",QuestionDataTypes.dtNumber));
		   this.DataTypes.push(new DataDefine("手机号码",QuestionDataTypes.dtPhone));
	   },
	   
	methods:{
		handleChange(event) {
	  console.info(event);
      //var value = event.target.value;
      this.$emit('input', event); //触发 input 事件，并传入新值
    }
	}

    
}

</script>
 
<style>


</style>
